package com.cy.lib.image;

import android.graphics.Bitmap;

import com.nostra13.universalimageloader.core.DisplayImageOptions;

/**
 * @author CY
 * @title
 * @date 2015/7/20
 * @qq 568305883
 * @email tmxdyf@163.com
 */
public class ImageOptions {

    private static DisplayImageOptions circleImageOptions;
    private static DisplayImageOptions defaultImageOptions;

    public static DisplayImageOptions getCircleImageOptions() {
        if (circleImageOptions == null) {
            circleImageOptions = new DisplayImageOptions.Builder().cacheOnDisk(true).displayer(new CircleBitmapDisplayer()).build();
        }
        return circleImageOptions;
    }

    public static DisplayImageOptions getDefaultImageOptions() {
        if (defaultImageOptions == null) {
            defaultImageOptions = new DisplayImageOptions.Builder().cacheOnDisk(true).bitmapConfig(Bitmap.Config.RGB_565).build();
        }
        return defaultImageOptions;
    }
}
